package edu.berkeley.guir.webquilt;

/**
 *
 * <PRE>
 * Revisions:  - WebQuilt-v1.0-1.0.0, Nov 12000, JH
 *               Created class
 *             - WebQuilt-v1.0-1.0.0, Feb 01 2001, jheer
 *               Added parameter and proxy constants
 *             - WebQuilt-v1.0-2.0.0, Mar 10 2001, jheer
 *               Added max file save, log suffix, and default task constants
 *             - Feb 14, 2002, kaow
 *               Added checkable protocols, urlCharEncoding
 * </PRE>
 *
 * @author  <A HREF="http://www.cs.berkeley.edu/~jasonh/">Jason Hong</A> (
 *          <A HREF="mailto:jasonh@cs.berkeley.edu">jasonh@cs.berkeley.edu</A> )
 * @author  Jeffrey Heer (
 *          <A HREF="mailto:jheer@hkn.eecs.berkeley.edu">jheer@hkn.eecs.berkeley.edu</A> )
 * @author  <A HREF="http://www.cs.berkeley.edu/~waterson/">Sarah Waterson</A> (
 *          <A HREF="mailto:waterson@cs.berkeley.edu">waterson@cs.berkeley.edu</A> )
 * @author  Wayne Kao (
 *          <A HREF="mailto:kaow@cs.berkeley.edu">kaow@cs.berkeley.edu</A> )
 * @since   JDK 1.3
 * @version WebQuilt-v1.0-2.0.0, FEB 7 2002
 */
public interface WebQuiltConstants {

   //===========================================================================
   //===   CONSTANTS   =========================================================

   public static final String PARAM_REPLACE  = "wq_replace";
   public static final String PARAM_TID      = "wq_tid";
   public static final String PARAM_LINKID   = "wq_linkid";
   public static final String PARAM_PARENTID = "wq_parentid";
   public static final String PARAM_FRAMEID  = "wq_frameid";
   public static final String PARAM_TASKID   = "wq_taskid";
   public static final String PARAM_USERID   = "wq_userid";
   public static final String PARAM_TASKBOX  = "wq_taskbox";
   public static final String PARAM_TRACKSTRING = "wq_trackstring";

   public static final String[] PARAMS = { PARAM_REPLACE,  PARAM_TID,     PARAM_LINKID,
					   PARAM_PARENTID, PARAM_FRAMEID, PARAM_TASKID,
 					   PARAM_USERID, PARAM_TASKBOX, PARAM_TRACKSTRING };
   public static final String[] PASSWD = { "passwd", "password", "pwd",
					   "PASSWD", "PASSWORD", "PWD"  };

   public static final String DEFAULT_TASK   = "anon";
   public static final String LOGFILE_SUFFIX = ".txt";
   public static final int    MAX_CACHED_FILE_SIZE = 2000000;

   public static final String BUGREP_FILE   = "WQ_BUGREP.txt";

   public static final String PROXY_FILE    = "webproxy";
   public static final String PROXY_LOGVIEW = "logview.jsp";
   public static final String PROXY_BUGREP  = "bugrep.jsp";
   public static final String PROXY_RESET   = "reset.jsp";
   public static final String PROXY_SYNC    = "sync.jsp";
   public static final String PROXY_START   = "/home/jheer/research/GUIR/webquilt/proxy/ProxyStart.html";

   public static final double DEFAULT_ZOOM_NOTCH_0    = 0.01;
   public static final double DEFAULT_ZOOM_NOTCH_10   = 0.02;  // overview
   public static final double DEFAULT_ZOOM_NOTCH_20   = 0.04;
   public static final double DEFAULT_ZOOM_NOTCH_30   = 0.07;  // site map
   public static final double DEFAULT_ZOOM_NOTCH_40   = 0.10;
   public static final double DEFAULT_ZOOM_NOTCH_50   = 0.16;  // storyboard
   public static final double DEFAULT_ZOOM_NOTCH_60   = 0.36;
   public static final double DEFAULT_ZOOM_NOTCH_70   = 0.64;  // page
   public static final double DEFAULT_ZOOM_NOTCH_80   = 1.00;
   public static final double DEFAULT_ZOOM_NOTCH_90   = 1.25;  // detail
   public static final double DEFAULT_ZOOM_NOTCH_100  = 1.50;



   //-----------------------------------------------------------------

   /** Size of large web page images. */
   public static final int DEFAULT_WIDTH_LARGE   = 1024;

   /** Size of large web page images. */
   public static final int DEFAULT_HEIGHT_LARGE  = 768;


   /** Size of medium web page images. */
   public static final int DEFAULT_WIDTH_MEDIUM  = 800;

   /** Size of medium web page images. */
   public static final int DEFAULT_HEIGHT_MEDIUM = 600;


   /** Size of small web page images. */
   public static final int DEFAULT_WIDTH_SMALL   = 640;

   /** Size of small web page images. */
   public static final int DEFAULT_HEIGHT_SMALL  = 480;

   public static final int DEFAULT_BROWSER_WIDTH  = DEFAULT_WIDTH_MEDIUM;
   public static final int DEFAULT_BROWSER_HEIGHT = DEFAULT_HEIGHT_MEDIUM;

   public static final int WIDTH_PALM = 240; //370;
   public static final int HEIGHT_PALM = 320;//400;

   public static final int WIDTH_PHONE = 100;
   public static final int HEIGHT_PHONE = 100;

   public static final int WIDTH_DESKTOP = DEFAULT_WIDTH_MEDIUM;
   public static final int HEIGHT_DESKTOP = DEFAULT_HEIGHT_MEDIUM;

   //-----------------------------------------------------------------

  /** Browser form parameters */
  public static final String ATTRIB_TASKID  = "TASKID";
  public static final String ATTRIB_USERID  = "USERID";
  public static final String ATTRIB_TASKBOX = "TASKBOX";

  /** checkable protocols */
  public static final String[] CHECKABLE_PROTOCOLS = { "http:", "https:", "ftp:", "gopher:" };

  /** what to encode URLs in.  See java.nio.charset.Charset for all possibilities */
  public static final String urlCharEncoding = "US-ASCII";


   //===   CONSTANTS   =========================================================
   //===========================================================================

} // of interface

//==============================================================================

/*
Copyright (c) 2000 Regents of the University of California.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

3. All advertising materials mentioning features or use of this software
   must display the following acknowledgement:

      This product includes software developed by the Group for User
      Interface Research at the University of California at Berkeley.

4. The name of the University may not be used to endorse or promote products
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/


